#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n,m,sum;
	m = 1;
	sum = 0;
	int i;
	scanf("%d", &n);

	for (i = 1; i <= n; i++)
	{
		m = m * i;
		sum += m;

	}
	printf("%d", sum);
	return 0;
}